package com.github.itdachen.admin.convert;

import com.github.itdachen.admin.entity.ClazzFunc;
import com.github.itdachen.admin.sdk.dto.ClazzFuncDTO;
import com.github.itdachen.admin.sdk.vo.ClazzFuncVO;

/**
 * 岗位职能管理表(确定之后不能修改) 类型转换
 *
 * @author 王大宸
 * @date 2024-12-28 18:40:48
 */
public class ClazzFuncConvert {

    public static ClazzFunc toJavaObject(ClazzFuncDTO clazzFuncDTO) {
        if (null == clazzFuncDTO) {
            return null;
        }
        ClazzFunc clazzFunc = new ClazzFunc();
        clazzFunc.setId(clazzFuncDTO.getId());
        clazzFunc.setTenantId(clazzFuncDTO.getTenantId());
        clazzFunc.setFuncCode(clazzFuncDTO.getFuncCode());
        clazzFunc.setFuncTitle(clazzFuncDTO.getFuncTitle());
        clazzFunc.setValidFlag(clazzFuncDTO.getValidFlag());
        clazzFunc.setRemarks(clazzFuncDTO.getRemarks());
        return clazzFunc;
    }


    public static ClazzFuncVO toJavaObjectVO(ClazzFunc clazzFunc) {
        if (null == clazzFunc) {
            return null;
        }
        ClazzFuncVO clazzFuncVO = new ClazzFuncVO();
        clazzFuncVO.setId(clazzFunc.getId());
        clazzFuncVO.setTenantId(clazzFunc.getTenantId());
        clazzFuncVO.setFuncCode(clazzFunc.getFuncCode());
        clazzFuncVO.setFuncTitle(clazzFunc.getFuncTitle());
        clazzFuncVO.setValidFlag(clazzFunc.getValidFlag());
        clazzFuncVO.setRemarks(clazzFunc.getRemarks());
        return clazzFuncVO;
    }

    public ClazzFunc toJavaObject(ClazzFuncVO clazzFuncVO) {
        if (null == clazzFuncVO) {
            return null;
        }
        ClazzFunc clazzFunc = new ClazzFunc();
        clazzFunc.setId(clazzFuncVO.getId());
        clazzFunc.setTenantId(clazzFuncVO.getTenantId());
        clazzFunc.setFuncCode(clazzFuncVO.getFuncCode());
        clazzFunc.setFuncTitle(clazzFuncVO.getFuncTitle());
        clazzFunc.setValidFlag(clazzFuncVO.getValidFlag());
        clazzFunc.setRemarks(clazzFuncVO.getRemarks());
        return clazzFunc;
    }

    public ClazzFuncVO toJavaObjectVO(ClazzFuncDTO clazzFuncDTO) {
        if (null == clazzFuncDTO) {
            return null;
        }
        ClazzFuncVO clazzFuncVO = new ClazzFuncVO();
        clazzFuncVO.setId(clazzFuncDTO.getId());
        clazzFuncVO.setTenantId(clazzFuncDTO.getTenantId());
        clazzFuncVO.setFuncCode(clazzFuncDTO.getFuncCode());
        clazzFuncVO.setFuncTitle(clazzFuncDTO.getFuncTitle());
        clazzFuncVO.setValidFlag(clazzFuncDTO.getValidFlag());
        clazzFuncVO.setRemarks(clazzFuncDTO.getRemarks());
        return clazzFuncVO;
    }


}